// import '@/assets/index.scss'
import '@/styles/index.scss'
import {createApp} from 'vue'

import App from './App.vue'
import router from './router'

const app = createApp(App)


// npm i pinia pinia-plugin-persistedstate --save
import {createPinia} from 'pinia'
import ppp from 'pinia-plugin-persistedstate'

const pinia = createPinia()
pinia.use(ppp)
app.use(pinia)


app.use(router)

import SvgIcon from '@/components/SvgIcon/index.vue'

app.component('SvgIcon', SvgIcon)

//npm i element-plus --save
import 'element-plus/dist/index.css'

import ep from 'element-plus'
import locale from 'element-plus/es/locale/lang/zh-cn'

app.use(ep, {locale})


// 安装icons组件
// npm install @element-plus/icons-vue
import * as epi from '@element-plus/icons-vue'

for (const [key, component] of Object.entries(epi)) {
    app.component(key, component)
}


//npm i vue-i18n --save
import i18n from '@/i18n'

app.use(i18n)

app.mount('#app')
